<!--
 * @Description: 
 * @Author: wangqi
 * @Date: 2021-05-03 09:53:15
 * @LastEditTime: 2021-05-03 11:09:43
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <p>{{ message }}</p>
        <input type="text" v-model="message">
        <div v-bind:id="dynamicId"></div>
        <button disabled>Button</button>
        <user-info :username="username" :sage="sage"></user-info>
    </div>

</body>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    Vue.component('user-info', {
        props: ['username', 'sage'],
        template: '<p>{{ username }} - {{sage}}</p>',
        mounted() {
            console.log(this.username, "username")
        }
    });

    const vm = new Vue({
        el: "#app",
        data: {
            dynamicId:"xx",
            isButtonDisabled: false,
            message: "wq21122",
            username: "wangqi111",
            sage: "",
        },
        mounted() {
            console.log(this.message, this.username, "x")
        }
    });


    vm.message = "xxxxxxxxx";
    vm.sage = 12;
    console.log(vm, "vm")
</script>

</html>